<?php
// +----------------------------------------------------------------------
// | Name 风音框架
// +----------------------------------------------------------------------
// | Author 唐启云 <tqy@fxri.net>
// +----------------------------------------------------------------------
// | Copyright Copyright © 2016-2099 方弦研究所. All rights reserved.
// +----------------------------------------------------------------------
// | Link https://www.fxri.net
// +----------------------------------------------------------------------

/**
 * 安全配置
 * @return array
 */
return [
    // 基础
    'base' => [
        // 加密-开关
        'crypt_switch' => true,
        // 加密-方法
        'crypt_method' => 'des-cbc',
        // 加密-密钥
        'crypt_key' => '00000000',
        // 加密-标记
        'crypt_options' => OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING,
        // 加密-偏移量
        'crypt_iv' => "00000000",
        // 加密-补位
        'crypt_fill' => "\x9c",
    ],
    // RSA
    'rsa' => [
        // 加密-开关
        'crypt_switch' => true,
        // 加密-私钥
        'crypt_private' => \fxapp\Base::config('app.base.app') . 'elven' . DIRECTORY_SEPARATOR . 'misc' . DIRECTORY_SEPARATOR . 'pem' . DIRECTORY_SEPARATOR . 'rsa_private.pem',
        // 加密-公钥
        'crypt_public' => \fxapp\Base::config('app.base.app') . 'elven' . DIRECTORY_SEPARATOR . 'misc' . DIRECTORY_SEPARATOR . 'pem' . DIRECTORY_SEPARATOR . 'rsa_public.pem',
        // 加密-参数
        'crypt_param' => [
            'type' => OPENSSL_PKCS1_PADDING,
            'pad' => "\0",
        ],
    ],
];
